<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>增加用户</title>
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.0.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" media="all">
    <script>
        $(document).ready(function () {
            $.get("${pageContext.request.contextPath}/directory/init",function (data) {
                let context = ``;
                for (let i = 0; i < data.data.length; i++) {
                    context = context + `
                        <option value="` + data.data[i].cid + `">` + data.data[i].cname + `</option>
                    `;
                }
                $("#cid").html(context);

            })
        })
    </script>
</head>

<body>
<div class="container">
    <div class="row"><c:import url="component/header.jsp"></c:import></div><br><br><br>
    <div class="row">
        <h2>增加动漫</h2>
    </div>
    <form action="${pageContext.request.contextPath}/adminAnim/addAnim" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label>动漫名：</label>
            <input type="text" class="form-control" id="aname" name="aname" placeholder="请输入动漫名姓名">
        </div>

        <div class="form-group">
            <label>动漫原名：</label>
            <input type="text" class="form-control" id="aname_jp" name="aname_jp" placeholder="请输入动漫名姓名">
        </div>

        <div class="form-group">
            <label for="cover_img">动漫封面</label>
            <input type="file" id="cover_img" name="cover_img">
            <p class="help-block" id="tip">选择动漫图片</p>
        </div>

        <div class="form-group">
            <label for="flash_time">更新时间：</label>
            <input type="text" class="form-control" id="flash_time" name="flash_time" placeholder="格式 周一:10">
        </div>

        <div class="form-group" id="state">
            <label>更新状态：</label>
            <input type="radio" name="state" value="已完结"/>已完结
            <input type="radio" name="state" value="连载中"/>连载中
            <input type="radio" name="state" value="未播出"/>未播出
        </div>

        <div class="form-group">
            <label for="create_time">定档时间：</label>
            <input type="datetime-local" class="form-control" id="create_time" name="create_time" >
        </div>

        <div class="form-group">
            <label for="author">作者：</label>
            <input type="text" class="form-control" id="author" name="author" placeholder="请输入动漫作者">
        </div>

        <div class="form-group">
            <label for="cid">类型：</label>
            <select name="cid" class="form-control" id="cid">
            </select>
        </div>

        <div class="form-group">
            <label for="simpl_introduce">简单介绍：</label>
            <textarea class="form-control" id="simpl_introduce" name="simpl_introduce" placeholder="请输入动漫简单介绍"></textarea>
        </div>

        <div class="form-group">
            <label for="production_company">出品公司：</label>
            <input type="text" class="form-control" id="production_company" name="production_company" placeholder="请输入动漫出品公司">
        </div>

        <div class="form-group">
            <label for="pv">pv：</label>
            <input type="text" class="form-control" id="pv" name="pv" placeholder="请输入动漫pv地址">
        </div>

        <div class="form-group">
            <label for="detailed">动漫详细说明：</label>
            <textarea type="text" class="form-control" id="detailed" name="detailed" placeholder="请输入动漫详细说明" style="height: 200px"></textarea>
        </div>

        <div class="form-group">
            <label for="num">动漫总集数：</label>
            <input type="text" class="form-control" id="num" name="num" placeholder="请输入动漫总集数">
        </div>

        <div class="form-group" style="text-align: center">
            <input class="btn btn-success" type="submit" value="提交" />
            <input class="btn btn-default" type="button" value="返回" />
        </div>
    </form>


</div>

</body>
</html>
